package com.heima.user.feign;

import apis.user.IUserClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.pojos.ApUser;
import com.heima.user.service.ApUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class UserClient implements IUserClient {
    @Autowired
    private ApUserService apUserService;

    //获取评论作者信息
    @PostMapping("/getUser/{userId}")
    public ResponseResult<ApUser> getUser(@PathVariable Integer userId){
        ApUser apUser = apUserService.getById(userId);
        return ResponseResult.okResult(apUser);
    }
}
